<template>
 <footer class="footer">
      <span class="todo-count" v-show="residue"><strong>{{residue}}</strong>剩余</span>
      <ul class="filters">
        <li>
          <a :class="{selected : type === 'all'}" href="#/"  @click.prevent="screen('all')">全部</a>
        </li>
        <li>
          <a :class="{selected : type === 'active'}" href="#/active" @click.prevent="screen('active')">进行中</a>
        </li>
        <li>
          <a :class="{selected : type === 'completed'}" href="#/completed"  @click.prevent="screen('completed')">已完成</a>
        </li>
      </ul>
      <button class="clear-completed" @click="cleanup" v-show="listAll">清除已完成</button>
    </footer>
</template>

<script>
 export default {
   name: 'HmFoodaer',
   props: {
    residue:{
        type:Number,
        require:true
    },
    type:{
        type:String,
        require:true
    },
    listAll:{
        type:Boolean,
        require:true
    },
   },
   components: {

   },
   methods:{
    screen(data){
        this.$emit("screen",data)
    },
    cleanup(){
        this.$emit("cleanup")
    },
   },
   
 }
</script>

<style scoped lang='less'>

</style>